package com.example.cp.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.example.cp.R;
import com.example.cp.entivity.VideoResult;

import java.util.List;

public class VideoAdapter extends BaseQuickAdapter<VideoResult.DataBean, BaseViewHolder> {
    public VideoAdapter(int layoutResId, List<VideoResult.DataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, VideoResult.DataBean dataBean) {
            ImageView image = baseViewHolder.getView(R.id.image);
        Glide.with(getContext()).load(dataBean.getVideomainimg()).into(image);
        baseViewHolder.setText(R.id.tt,dataBean.getCaption());
    }
}
